#platform "Gen4-uLCD-35DCT-CLB"


// generated 02/08/2018 14:34:00

#MODE FLASHBANK_1

#inherit "4DGL_16bitColours.fnc"

#inherit "VisualConst.inc"


#inherit "BCN3D_SIGMAConst.inc"

#inherit "CLPrintStrings.inc"

#constant IPDatasize 22

#CONST
    CMDLenMAX   80
    seroutX     $serout
    serinX      $serin
#END

#CONST
    ColorBGimage     0x0020
    ACK         0x06
    NAK         0x15
    ReadCmd     0x80
    WriteCmd    0x00
//  IPD_TYPE    0 // offsets are doubled as FLASH is byte addressable
    Ofs_IPD_P1      2
    Ofs_IPD_P2      4
    Ofs_IPD_P3      6
    Ofs_IPD_P4      8
    Ofs_IPD_P5      10
    Ofs_IPD_P6      12
    Ofs_IPD_P7      14
    Ofs_IPD_DOWN    16
    Ofs_IPD_RELEASE 18
    Ofs_IPD_OBJVIDX 20
// object indexes
    tDipSwitch      0
    tKnob           1
    tRockerSwitch   2
    tRotarySwitch   3
    tGSlider        4
    tTrackbar       5
    tWinButton      6
    tAngularmeter   7   // need to implement use of this, inputs must be ordered first
    tCoolgauge      8
    tCustomdigits   9
    tForm           10
    tGauge          11
    tImage          12
    tKeyboard       13  // this is a special input, does not need to be at front
    tLed            14
    tLeddigits      15
    tMeter          16
    tStrings        17  // also need output strings code
//    tStringUNI      0x3f | 0x40
//    tStringANSII    0x3f
    tThermometer    18
    tUserled        19
    tVideo          20
    tStaticText     21
// Remove, check for non visual objects instead
//    MaxVisObjects   21  // objects that have a visual component 
    tSounds         22
    tTimer          23
    tSpectrum       24
    tScope          25
    tTank           26
    tUserImages     27
    tPinOutput      28
    tPinInput       29 
    t4Dbutton       30    // more inputs 
    tAniButton      31
    tColorPicker    32 
    tUserButton     33     
    tMagicObject    34     
    tSmartGauge     35 
    tSmartSlider    36 
    tSmartKnob      37 
// tGradient, tBorder, tScale are not real objects, generated totally within Workshop
    MaxTotObjects   37 // objects in objects array
//    OT_DISPLAY      22
    OT_REPORT       100
    OT_SETCONST     101
    OT_SETANOTHER   102
    OT_ACTIVATE     103
    OT_NEXTFRAME    104
    OT_PREVFRAME    105
    OT_NEXTSTRING   106
    OT_PREVSTRING   107
    OT_MAGIC        108
// other OT_s Form activate,
// Indexes into LedDigits and CustomDigits arrays
    Ofs_Digits_Left           0
    Ofs_Digits_Digits         2
    Ofs_Digits_MinDigits      4
    Ofs_Digits_Widthdigit     6
    Ofs_Digits_LeadingBlanks  8
// indexes to Strings arrays
    Ofs_String_StartH        0
    Ofs_String_StartL        2
    Ofs_String_Size          4
    Ofs_String_x1            6
    Ofs_String_y1            8
    Ofs_String_x2            10
    Ofs_String_y2            12
    Ofs_String_FGColor       14
    Ofs_String_BGColor       16
    Ofs_String_FontAttribs   18
    Ofs_String_Transparent   20 // bit transparent should 'refresh' background, otherwise rectangle out
    Ofs_String_Ansi          22 // bit defines write/draw routine
    Ofs_String_Form          24 // form this string can be seen in
// Command codes
    READ_OBJ        0
    WRITE_OBJ       1
    WRITE_STR       2
    WRITE_STRU      3
    WRITE_CONTRAST  4
    REPORT_OBJ      5
    REPORT_EVENT    7
    WRITE_MAGIC_BYTES 8
    WRITE_MAGIC_DBYTES  9
    REPORT_MAGIC_EVENT_BYTES 10
    REPORT_MAGIC_EVENT_DBYTES 11
// End P1.inc
    nObjects        708
    nInputs         691
    nAniTimers      0
    nStrings        56
#END

#DATA
    word FormStartIndex 0, 1, 5, 199, 67, 73, 78, 350, 253, 84, 240, 255, 242, 204, 104, 244, 179, 211, 263, 108, 110, 123, 281, 296, 343, 213, 401, 598, 126, 273, 410, 146, 149, 152, 167, 173, 269, 286, 288, 290, 632, 340, 299, 319, 183, 413, 321, 209, 609, 223, 324, 330, 229, 474, 333, 336, 345, 347, 352, 364, 356, 635, 359, 362, 375, 378, 383, 386, 389, 415, 416, 418, 420, 422, 424, 427, 428, 431, 434, 448, 437, 444, 488, 492, 495, 498, 509, 515, 523, 524, 601, 527, 530, 533, 536, 539, 557, 560, 576, 587, 589, 591, 593, 595, 597, 604, 607, 612, 617, 620, 625, 628, 630, 637, 640, 651, 665, 668, 671, 689, 691, 693
    word FormEndIndex 1, 5, 67, 204, 73, 78, 84, 352, 255, 104, 242, 263, 244, 209, 108, 253, 183, 213, 269, 110, 123, 126, 286, 299, 345, 223, 410, 601, 146, 281, 413, 149, 152, 167, 173, 179, 273, 288, 290, 296, 635, 343, 319, 321, 199, 415, 324, 211, 612, 229, 330, 333, 240, 488, 336, 340, 347, 350, 356, 375, 359, 637, 362, 364, 378, 383, 386, 389, 401, 416, 418, 420, 422, 424, 427, 428, 431, 434, 437, 474, 444, 448, 492, 495, 498, 509, 515, 523, 524, 527, 604, 530, 533, 536, 539, 557, 560, 576, 587, 589, 591, 593, 595, 597, 598, 607, 609, 617, 620, 625, 628, 630, 632, 640, 651, 665, 668, 671, 689, 691, 693, 708
    word InputControls -1, -1, 0, 44, 88, -1, 132, 176, 220, 264, 308, 352, 396, 440, -1, -1, 484, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 550, 594, 638, 682, 726, -1, 792, 836, 902, 946, -1, 990, 1034, 1078, 1122, 1188, -1, 1232, 1276, 1320, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1364, -1, -1, 1408, 1452, 1496, -1, 1540, -1, 1584, 1628, 1672, 1716, 1760, 1804, -1, -1, -1, 1848, 1892, 1936, -1, 1980, -1, -1, 2024, 2068, 2112, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2156, -1, 2200, -1, -1, 2244, -1, -1, 2288, 2332, 2376, 2420, 2464, 2508, 2552, 2596, 2640, 2684, 2728, 2772, -1, -1, -1, 2816, 2860, 2904, 2948, -1, -1, 2992, 3036, 3080, 3124, -1, -1, 3168, 3212, -1, -1, 3256, 3300, 3344, 3388, 3432, 3476, -1, -1, -1, -1, -1, -1, -1, 3520, 3564, -1, 3608, 3652, 3696, 3740, -1, 3784, 3828, 3872, 3916, -1, 3960, -1, -1, -1, 4004, 4048, 4092, 4136, 4180, 4224, 4268, 4312, -1, -1, 4356, 4400, 4444, 4488, 4532, -1, 4576, 4620, 4664, 4708, 4752, -1, -1, -1, -1, 4796, -1, 4840, -1, 4884, -1, 4928, 4972, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5016, 5060, 5104, 5148, 5192, -1, 5236, -1, 5280, 5324, 5368, 5412, 5456, -1, -1, -1, -1, -1, 5522, 5566, 5610, 5654, -1, 5698, 5742, -1, 5786, 5830, 5874, 5918, -1, 5962, -1, 6006, -1, 6050, 6094, 6138, 6182, 6248, -1, 6292, 6336, -1, 6380, 6424, 6468, 6512, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6556, -1, -1, 6600, -1, 6644, 6688, 6732, 6776, 6820, -1, 6864, 6908, -1, 6952, 6996, -1, 7040, 7062, 7106, -1, 7150, 7194, -1, 7238, -1, 7282, -1, 7326, 7370, -1, 7414, -1, -1, -1, -1, -1, 7458, 7502, -1, 7546, 7590, -1, 7634, -1, 7678, 7722, 7766, 7810, 7854, 7898, 7942, -1, 7986, 8030, -1, 8074, 8118, -1, 8162, 8206, 8250, 8294, -1, 8360, 8426, -1, 8470, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8514, 8580, -1, -1, 8624, 8668, -1, -1, -1, -1, -1, -1, -1, 8712, 8756, -1, -1, -1, -1, 8800, -1, 8844, -1, -1, -1, -1, -1, 8888, 8932, -1, -1, 8976, 9020, -1, 9064, 9108, -1, 9152, 9196, -1, 9240, 9284, 9328, 9394, 9460, 9504, -1, 9548, 9592, 9636, -1, 9680, -1, -1, 9724, 9768, 9812, 9856, 9900, -1, -1, -1, -1, -1, -1, -1, -1, 9944, 9988, 10032, 10076, 10120, 10164, -1, -1, 10208, -1, 10252, 10296, 10340, 10384, 10428, 10472, -1, -1, -1, -1, -1, -1, 10516, -1, 10560, 10604, -1, -1, -1, 10648, -1, 10692, 10736, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10780, 10846, -1, 10890, 10934, 10978, 11022, -1, -1, 11066, 11110, 11154, 11198, -1, 11242, 11286, -1, -1, 11330, 11374, -1, 11418, 11462, -1, 11506, 11550, -1, 11594, 11638, -1, 11682, 11726, -1, 11770, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11814, 11858, -1, 11902, 11946, 11990, -1, -1, -1, -1, -1, -1, -1, -1, 12034, 12078, 12122, -1, -1, 12166, 12210, 12254, 12298, 12342, 12386, 12430, 12474, -1, -1, -1, 12518, -1, 12562, -1, 12606, -1, -1, -1, 12650, -1, -1, 12694, 12738, -1, 12782, 12826, -1, 12870, 12914, -1, 12958, -1, 13002, 13046, -1, 13090, -1, -1, -1, -1, 13134, 13178, -1, 13222, 13266, 13310, 13354, -1, 13398, 13442, -1, 13486, -1, 13530, -1, 13574, 13618, -1, 13662, -1, 13706, 13750, -1, 13794, 13838, -1, -1, -1, -1, -1, -1, -1, -1, -1, 13904, 13948, -1, -1, -1, -1, -1, -1, -1, -1, 13992, 14036, 14080, -1, 14124, 14168, -1, 14212, 14256, -1, 14300, 14344, 14388, 14432, 14476, 14520, 14564, 14608, 14652, 14696, 14740, -1, -1, -1, -1, 14784, 14806, -1, 14850, -1, 14894, -1, -1, -1, -1, -1, -1, -1, -1, -1, 14938, 14982, 15026, 15070, 15114, 15158
    word InputData tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 22, 4,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 66, 124,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 110, 178,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 154, 12,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 198, 32,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 242, 76,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 286, 112,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 330, 30,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 374, 114,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 418, 172,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 462, 174,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 506, 80,
                OT_ACTIVATE, 10, 5, 0, 18, 0, 0, 0, 0, 528, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 572, 18,
                OT_ACTIVATE, 10, 39, 0, 18, 0, 0, 0, 0, 0, 0,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 616, 16,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 660, 20,
                OT_ACTIVATE, 10, 6, 0, 18, 0, 0, 0, 0, 0, 0,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 704, 450,
                OT_ACTIVATE, 10, 80, 0, 18, 0, 0, 0, 0, 0, 0,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 748, 92,
                OT_ACTIVATE, 10, 5, 0, 18, 0, 0, 0, 0, 770, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 814, 26,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 858, 28,
                OT_ACTIVATE, 10, 4, 0, 18, 0, 0, 0, 0, 880, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 924, 110,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 968, 116,
                OT_ACTIVATE, 10, 65, 0, 18, 0, 0, 0, 0, 0, 0,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1012, 6,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1056, 102,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1100, 320,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 1144, 98,
                OT_ACTIVATE, 10, 5, 0, 18, 0, 0, 0, 0, 1166, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 1210, 144,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1254, 40,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1298, 34,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1342, 38,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1386, 254,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1430, 36,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1474, 66,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1518, 68,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 1562, 156,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1606, 152,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1650, 154,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1694, 156,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1738, 168,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1782, 132,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1826, 142,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1870, 158,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1914, 160,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 1958, 432,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2002, 108,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2046, 24,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2090, 164,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2134, 166,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 2178, 86,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2222, 190,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2266, 192,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2310, 54,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2354, 46,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2398, 48,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2442, 50,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2486, 52,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2530, 56,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2574, 70,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2618, 72,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2662, 260,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2706, 272,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2750, 274,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2794, 278,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2838, 226,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2882, 228,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2926, 230,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 2970, 426,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3014, 232,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3058, 234,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3102, 236,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3146, 428,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3190, 84,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3234, 318,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3278, 304,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 151,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3322, 306,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 152,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3366, 310,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3410, 312,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3454, 314,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 156,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3498, 316,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 3542, 122,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3586, 150,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3630, 60,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 3674, 2,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 3718, 4,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 3762, 28,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 3806, 62,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 3850, 6,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 3894, 8,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 3938, 24,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 3982, 168,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4026, 264,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4070, 322,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4114, 326,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 162,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4158, 356,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4202, 358,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4246, 396,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 197,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4290, 410,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4334, 412,
                OT_ACTIVATE, 10, 106, 0, 18, 0, 0, 0, 0, 0, 0,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4378, 262,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4422, 130,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 4466, 70,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 4510, 146,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 4554, 34,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4598, 290,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4642, 298,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 148,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4686, 300,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 149,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4730, 302,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4774, 324,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 161,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 4818, 124,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 4862, 30,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 4906, 154,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4950, 78,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 4994, 80,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5038, 8,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5082, 82,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5126, 86,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5170, 92,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5214, 94,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 5258, 74,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5302, 120,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5346, 162,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5390, 434,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 216,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 5434, 76,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 5478, 78,
                OT_ACTIVATE, 10, 5, 0, 18, 0, 0, 0, 0, 5500, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5544, 184,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5588, 186,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5632, 244,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5676, 246,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 5720, 88,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 5764, 118,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5808, 182,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5852, 248,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 5896, 116,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 5940, 170,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 5984, 162,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6028, 268,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 133,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6072, 282,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6116, 284,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6160, 308,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 6204, 90,
                OT_ACTIVATE, 10, 5, 0, 18, 0, 0, 0, 0, 6226, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 6270, 120,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6314, 134,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6358, 436,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6402, 176,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6446, 238,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6490, 276,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6534, 476,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6578, 138,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 6622, 166,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6666, 360,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6710, 362,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 6754, 72,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 6798, 148,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 6842, 32,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6886, 364,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 181,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6930, 366,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 6974, 374,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7018, 376,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 187,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 0, 368,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7084, 370,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 184,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7128, 372,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 185,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7172, 136,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7216, 378,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 7260, 158,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 7304, 184,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7348, 100,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7392, 382,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 190,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 7436, 174,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7480, 390,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 194,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7524, 392,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 195,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7568, 384,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7612, 438,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 7656, 172,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7700, 388,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 193,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7744, 394,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7788, 400,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 199,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7832, 402,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7876, 404,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7920, 406,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 7964, 408,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 8008, 96,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 8052, 128,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8096, 414,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 206,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8140, 416,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 207,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8184, 398,
                OT_ACTIVATE, 10, 66, 0, 18, 0, 0, 0, 0, 0, 0,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8228, 420,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8272, 270,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 134,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 8316, 100,
                OT_ACTIVATE, 10, 5, 0, 18, 0, 0, 0, 0, 8338, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 8382, 102,
                OT_ACTIVATE, 10, 5, 0, 18, 0, 0, 0, 0, 8404, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 8448, 130,
                OT_ACTIVATE, 10, 65, 0, 18, 0, 0, 0, 0, 0, 0,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8492, 424,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 211,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 8536, 104,
                OT_ACTIVATE, 10, 5, 0, 18, 0, 0, 0, 0, 8558, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 8602, 132,
                OT_ACTIVATE, 10, 65, 0, 18, 0, 0, 0, 0, 0, 0,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8646, 188,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8690, 346,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8734, 348,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8778, 350,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 174,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 8822, 176,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 8866, 178,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8910, 418,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 208,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8954, 430,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 214,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 8998, 440,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 219,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9042, 442,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9086, 90,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9130, 444,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9174, 446,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9218, 448,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9262, 468,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9306, 488,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 9350, 106,
                OT_ACTIVATE, 10, 5, 0, 18, 0, 0, 0, 0, 9372, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 9416, 136,
                OT_ACTIVATE, 10, 4, 0, 18, 0, 0, 0, 0, 9438, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9482, 10,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9526, 98,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9570, 470,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9614, 222,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110,
                tSmartSlider, 1, 72, 353, 255, 186, -1, -1, 9658, 0, 2,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9702, 460,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9746, 456,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 227,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9790, 458,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9834, 454,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 226,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9878, 334,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9922, 342,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 9966, 494,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10010, 496,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10054, 498,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10098, 500,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10142, 502,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 250,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10186, 504,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 10230, 134,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10274, 328,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10318, 330,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10362, 332,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 165,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10406, 336,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10450, 338,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10494, 340,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 10538, 126,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10582, 478,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 238,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10626, 480,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 239,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 10670, 180,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10714, 484,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10758, 486,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 242,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 10802, 110,
                OT_ACTIVATE, 10, 5, 0, 18, 0, 0, 0, 0, 10824, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 10868, 140,
                OT_ACTIVATE, 10, 65, 0, 18, 0, 0, 0, 0, 0, 0,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10912, 506,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 10956, 508,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11000, 510,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11044, 250,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 11088, 150,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 11132, 152,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11176, 88,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11220, 96,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11264, 14,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11308, 44,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11352, 58,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11396, 64,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11440, 2,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11484, 258,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11528, 128,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11572, 146,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11616, 126,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11660, 148,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11704, 104,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11748, 122,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 11792, 180,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 11836, 54,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 11880, 56,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 11924, 82,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 11968, 84,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12012, 200,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12056, 202,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12100, 204,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12144, 206,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12188, 208,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12232, 210,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12276, 212,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12320, 214,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12364, 216,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12408, 218,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12452, 220,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12496, 242,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 12540, 196,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 12584, 186,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12628, 224,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12672, 252,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 12716, 26,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 12760, 160,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 12804, 182,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 12848, 140,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 12892, 18,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 12936, 190,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 12980, 10,
                OT_ACTIVATE, 10, 25, 0, 18, 0, 0, 0, 0, 0, 0,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 13024, 256,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 13068, 422,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13112, 12,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13156, 20,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13200, 192,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 13244, 462,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13288, 14,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13332, 16,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13376, 22,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13420, 50,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13464, 52,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 13508, 472,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 235,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13552, 194,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13596, 36,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13640, 164,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13684, 170,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13728, 38,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13772, 40,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13816, 42,
                OT_ACTIVATE, 10, 65, 0, 18, 0, 0, 0, 0, 0, 0,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13860, 44,
                OT_ACTIVATE, 10, 5, 0, 18, 0, 0, 0, 0, 13882, 0,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13926, 46,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 13970, 48,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 14014, 196,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 14058, 198,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 14102, 464,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 231,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 14146, 22,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 14190, 42,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14234, 94,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 14278, 74,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14322, 108,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14366, 68,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14410, 58,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14454, 60,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14498, 62,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14542, 64,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14586, 66,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14630, 112,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14674, 114,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14718, 138,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14762, 142,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 0, 106,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 14828, 118,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14872, 198,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14916, 188,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 14960, 200,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99,
                t4Dbutton, 1, -1, -1, -1, -1, -1, -1, 0, 15004, 202,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 15048, 144,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 15092, 194,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 15136, 240,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119,
                tUserButton, 1, -1, -1, -1, -1, -1, -1, 0, 15180, 266,
                OT_REPORT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132
    word iStrings0  Strings0StartH, Strings0StartL, Strings0Size, 260, 96, 445, 121, 0x5B50, BLACK, 0, 0, 1, 114 
    word iStrings1  Strings1StartH, Strings1StartL, Strings1Size, 44, 132, 258, 153, ROYALBLUE, WHITE, 0, 0, 1, 2 
    word iStrings2  Strings2StartH, Strings2StartL, Strings2Size, 222, 20, 471, 54, 0xDEFC, BLACK, 0, 0, 1, 9 
    word iStrings3  Strings3StartH, Strings3StartL, Strings3Size, 384, 292, 475, 317, 0x0A18, BLACK, 0, 0, 1, 0 
    word iStrings4  Strings4StartH, Strings4StartL, Strings4Size, 260, 178, 445, 203, 0x5B50, BLACK, 0, 0, 1, 114 
    word iStrings5  Strings5StartH, Strings5StartL, Strings5Size, 356, 92, 477, 116, 0x5B50, BLACK, 0, 0, 1, 97 
    word iStrings6  Strings6StartH, Strings6StartL, Strings6Size, 314, 96, 458, 124, 0x4B30, 0x017B, 0, 0, 1, 103 
    word iStrings7  Strings7StartH, Strings7StartL, Strings7Size, 202, 276, 281, 303, 0x0109, ROYALBLUE, 0, 0, 1, 20 
    word iStrings8  Strings8StartH, Strings8StartL, Strings8Size, 44, 184, 258, 205, ROYALBLUE, 0x017B, 0, 0, 1, 2 
    word iStrings9  Strings9StartH, Strings9StartL, Strings9Size, 104, 276, 183, 303, 0x0109, ROYALBLUE, 0, 0, 1, 20 
    word iStrings10  Strings10StartH, Strings10StartL, Strings10Size, 298, 276, 377, 303, 0x0109, ROYALBLUE, 0, 0, 1, 20 
    word iStrings11  Strings11StartH, Strings11StartL, Strings11Size, 268, 182, 349, 216, 0x1129, WHITE, 0, 0, 1, 59 
    word iStrings12  Strings12StartH, Strings12StartL, Strings12Size, 44, 236, 258, 257, ROYALBLUE, 0x017B, 0, 0, 1, 2 
    word iStrings13  Strings13StartH, Strings13StartL, Strings13Size, 98, 185, 407, 209, 0x4B30, 0x2039, 0, 0, 1, 23 
    word iStrings14  Strings14StartH, Strings14StartL, Strings14Size, 148, 184, 333, 209, 0x5B50, BLACK, 0, 0, 1, 117 

    word iStrings16  Strings16StartH, Strings16StartL, Strings16Size, 44, 284, 258, 305, ROYALBLUE, 0x017B, 0, 0, 1, 2 






    word iStrings23  Strings23StartH, Strings23StartL, Strings23Size, 44, 80, 258, 101, ROYALBLUE, 0x017B, 0, 0, 1, 2 



    word iStrings27  Strings27StartH, Strings27StartL, Strings27Size, 52, 264, 277, 292, 0x0109, 0x017B, 0, 0, 1, 15 










    word iStrings38  Strings38StartH, Strings38StartL, Strings38Size, 222, 20, 471, 54, 0xDEFC, BLACK, 0, 0, 1, 42 
    word iStrings39  Strings39StartH, Strings39StartL, Strings39Size, 52, 172, 447, 250, 0xD800, BLACK, 0, 0, 1, 67 




    word iStrings44  Strings44StartH, Strings44StartL, Strings44Size, 260, 84, 445, 109, 0x5B50, BLACK, 0, 0, 1, 68 



    word iStrings48  Strings48StartH, Strings48StartL, Strings48Size, 36, 160, 460, 184, 0x4B30, 0x2039, 0, 0, 1, 23 
    word iStrings49  Strings49StartH, Strings49StartL, Strings49Size, 260, 147, 445, 172, 0x5B50, BLACK, 0, 0, 1, 68 
    word iStrings50  Strings50StartH, Strings50StartL, Strings50Size, 52, 264, 282, 289, 0x0109, 0x017B, 0, 0, 1, 26 

    word iStrings52  Strings52StartH, Strings52StartL, Strings52Size, 364, 266, 472, 290, 0x5B50, BLACK, 0, 0, 1, 68 
    word iStrings53  Strings53StartH, Strings53StartL, Strings53Size, 76, 182, 459, 210, 0x4B30, 0x2039, 0, 0, 1, 62 

    word iStrings55  Strings55StartH, Strings55StartL, Strings55Size, 80, 174, 439, 202, 0x4B30, 0x2039, 0, 0, 1, 75 
    word oDipSwitchs 0
    word oKnobs 0
    word oRockerSwitchs 0
    word oRotarySwitchs 0
    word oGSliders 0
    word oTrackbars 0
    word oWinButtons 0
    word oAngularmeters 0
    word oCoolgauges 0
    word oCustomdigitss 87, iCustomdigits0, iCustomdigits1, iCustomdigits2, iCustomdigits3, iCustomdigits4, iCustomdigits5, iCustomdigits6, iCustomdigits7, iCustomdigits8, iCustomdigits9, iCustomdigits10, iCustomdigits11, iCustomdigits12, iCustomdigits13, iCustomdigits14, iCustomdigits15, iCustomdigits16, iCustomdigits17, iCustomdigits18, iCustomdigits19, iCustomdigits20, iCustomdigits21, iCustomdigits22, iCustomdigits23, iCustomdigits24, iCustomdigits25, iCustomdigits26, iCustomdigits27, iCustomdigits28, iCustomdigits29, iCustomdigits30, iCustomdigits31, iCustomdigits32, iCustomdigits33, iCustomdigits34, iCustomdigits35, iCustomdigits36, iCustomdigits37, iCustomdigits38, iCustomdigits39, iCustomdigits40, iCustomdigits41, iCustomdigits42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, iCustomdigits56, iCustomdigits57, iCustomdigits58, iCustomdigits59, iCustomdigits60, iCustomdigits61, iCustomdigits62, iCustomdigits63, iCustomdigits64, iCustomdigits65, iCustomdigits66, iCustomdigits67, iCustomdigits68, iCustomdigits69, iCustomdigits70, iCustomdigits71, iCustomdigits72, iCustomdigits73, iCustomdigits74, iCustomdigits75, iCustomdigits76, iCustomdigits77, iCustomdigits78, iCustomdigits79, iCustomdigits80, iCustomdigits81, iCustomdigits82, iCustomdigits83, iCustomdigits84, iCustomdigits85, iCustomdigits86
    word oForms 122, -1, iForm1, iForm2, iForm3, iForm4, iForm5, iForm6, iForm7, iForm8, iForm9, iForm10, iForm11, iForm12, iForm13, iForm14, iForm15, iForm16, iForm17, iForm18, iForm19, iForm20, iForm21, iForm22, iForm23, iForm24, iForm25, iForm26, iForm27, iForm28, iForm29, iForm30, iForm31, iForm32, iForm33, iForm34, iForm35, iForm36, iForm37, iForm38, iForm39, iForm40, iForm41, iForm42, iForm43, iForm44, iForm45, iForm46, iForm47, iForm48, iForm49, iForm50, iForm51, iForm52, iForm53, iForm54, iForm55, iForm56, iForm57, iForm58, iForm59, iForm60, iForm61, iForm62, iForm63, iForm64, iForm65, iForm66, iForm67, iForm68, iForm69, iForm70, iForm71, iForm72, iForm73, iForm74, iForm75, iForm76, iForm77, iForm78, iForm79, iForm80, iForm81, iForm82, iForm83, iForm84, iForm85, iForm86, iForm87, iForm88, iForm89, iForm90, iForm91, iForm92, iForm93, iForm94, iForm95, iForm96, iForm97, iForm98, iForm99, iForm100, iForm101, iForm102, iForm103, iForm104, iForm105, iForm106, iForm107, iForm108, iForm109, iForm110, iForm111, iForm112, iForm113, iForm114, iForm115, iForm116, iForm117, iForm118, iForm119, iForm120, iForm121
    word oGauges 0
    word oImages 0
    word oKeyboards 0
    word oLeds 0
    word oLeddigitss 0
    word oMeters 0
    word oStringss 56, iStrings0, iStrings1, iStrings2, iStrings3, iStrings4, iStrings5, iStrings6, iStrings7, iStrings8, iStrings9, iStrings10, iStrings11, iStrings12, iStrings13, iStrings14, -1, iStrings16, -1, -1, -1, -1, -1, -1, iStrings23, -1, -1, -1, iStrings27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, iStrings38, iStrings39, -1, -1, -1, -1, iStrings44, -1, -1, -1, iStrings48, iStrings49, iStrings50, -1, iStrings52, iStrings53, -1, iStrings55
    word oThermometers 0
    word oUserleds 0
    word oVideos 26, iVideo0, iVideo1, iVideo2, iVideo3, iVideo4, iVideo5, iVideo6, -1, -1, iVideo9, iVideo10, iVideo11, iVideo12, iVideo13, iVideo14, iVideo15, iVideo16, iVideo17, iVideo18, iVideo19, iVideo20, iVideo21, iVideo22, iVideo23, iVideo24, iVideo25
    word oStaticTexts 0
    word oSpectrums 0
    word oScopes 0
    word oTanks 0
    word oUserImagess 75, iUserimages0, iUserimages1, iUserimages2, iUserimages3, iUserimages4, iUserimages5, iUserimages6, iUserimages7, iUserimages8, iUserimages9, iUserimages10, iUserimages11, iUserimages12, iUserimages13, iUserimages14, iUserimages15, iUserimages16, iUserimages17, iUserimages18, iUserimages19, iUserimages20, iUserimages21, iUserimages22, iUserimages23, iUserimages24, iUserimages25, iUserimages26, iUserimages27, iUserimages28, iUserimages29, iUserimages30, iUserimages31, iUserimages32, iUserimages33, iUserimages34, iUserimages35, iUserimages36, iUserimages37, iUserimages38, iUserimages39, iUserimages40, iUserimages41, iUserimages42, iUserimages43, iUserimages44, iUserimages45, iUserimages46, iUserimages47, iUserimages48, iUserimages49, iUserimages50, iUserimages51, iUserimages52, iUserimages53, iUserimages54, iUserimages55, iUserimages56, iUserimages57, iUserimages58, iUserimages59, iUserimages60, iUserimages61, iUserimages62, iUserimages63, iUserimages64, iUserimages65, iUserimages66, iUserimages67, iUserimages68, iUserimages69, iUserimages70, iUserimages71, iUserimages72, iUserimages73, iUserimages74
    word oPinInputs 0
    word o4Dbuttons 101, i4Dbutton0, i4Dbutton1, i4Dbutton2, i4Dbutton3, i4Dbutton4, i4Dbutton5, i4Dbutton6, i4Dbutton7, i4Dbutton8, i4Dbutton9, i4Dbutton10, i4Dbutton11, i4Dbutton12, i4Dbutton13, i4Dbutton14, i4Dbutton15, i4Dbutton16, i4Dbutton17, i4Dbutton18, i4Dbutton19, i4Dbutton20, i4Dbutton21, i4Dbutton22, i4Dbutton23, i4Dbutton24, i4Dbutton25, i4Dbutton26, i4Dbutton27, i4Dbutton28, i4Dbutton29, i4Dbutton30, i4Dbutton31, i4Dbutton32, i4Dbutton33, i4Dbutton34, i4Dbutton35, i4Dbutton36, i4Dbutton37, i4Dbutton38, i4Dbutton39, i4Dbutton40, i4Dbutton41, i4Dbutton42, i4Dbutton43, i4Dbutton44, i4Dbutton45, i4Dbutton46, i4Dbutton47, i4Dbutton48, i4Dbutton49, i4Dbutton50, i4Dbutton51, i4Dbutton52, i4Dbutton53, i4Dbutton54, i4Dbutton55, i4Dbutton56, i4Dbutton57, i4Dbutton58, i4Dbutton59, i4Dbutton60, i4Dbutton61, i4Dbutton62, i4Dbutton63, i4Dbutton64, i4Dbutton65, i4Dbutton66, i4Dbutton67, i4Dbutton68, i4Dbutton69, i4Dbutton70, i4Dbutton71, i4Dbutton72, i4Dbutton73, i4Dbutton74, i4Dbutton75, i4Dbutton76, i4Dbutton77, i4Dbutton78, i4Dbutton79, i4Dbutton80, i4Dbutton81, i4Dbutton82, i4Dbutton83, i4Dbutton84, i4Dbutton85, i4Dbutton86, i4Dbutton87, i4Dbutton88, i4Dbutton89, i4Dbutton90, i4Dbutton91, i4Dbutton92, i4Dbutton93, i4Dbutton94, i4Dbutton95, i4Dbutton96, i4Dbutton97, i4Dbutton98, i4Dbutton99, i4Dbutton100
    word oAniButtons 0
    word oColorPickers 0
    word oUserButtons 255, iUserbutton0, iUserbutton1, iUserbutton2, iUserbutton3, iUserbutton4, iUserbutton5, iUserbutton6, iUserbutton7, iUserbutton8, iUserbutton9, iUserbutton10, iUserbutton11, iUserbutton12, iUserbutton13, iUserbutton14, iUserbutton15, iUserbutton16, iUserbutton17, iUserbutton18, iUserbutton19, iUserbutton20, iUserbutton21, iUserbutton22, iUserbutton23, iUserbutton24, iUserbutton25, iUserbutton26, iUserbutton27, iUserbutton28, iUserbutton29, iUserbutton30, iUserbutton31, iUserbutton32, iUserbutton33, iUserbutton34, iUserbutton35, iUserbutton36, iUserbutton37, iUserbutton38, iUserbutton39, iUserbutton40, iUserbutton41, iUserbutton42, iUserbutton43, iUserbutton44, iUserbutton45, iUserbutton46, iUserbutton47, iUserbutton48, iUserbutton49, iUserbutton50, iUserbutton51, iUserbutton52, iUserbutton53, iUserbutton54, iUserbutton55, iUserbutton56, iUserbutton57, iUserbutton58, iUserbutton59, iUserbutton60, iUserbutton61, iUserbutton62, iUserbutton63, iUserbutton64, iUserbutton65, iUserbutton66, iUserbutton67, iUserbutton68, iUserbutton69, iUserbutton70, iUserbutton71, iUserbutton72, iUserbutton73, iUserbutton74, iUserbutton75, iUserbutton76, iUserbutton77, iUserbutton78, iUserbutton79, iUserbutton80, iUserbutton81, iUserbutton82, iUserbutton83, iUserbutton84, iUserbutton85, iUserbutton86, iUserbutton87, iUserbutton88, iUserbutton89, iUserbutton90, iUserbutton91, iUserbutton92, iUserbutton93, iUserbutton94, iUserbutton95, iUserbutton96, iUserbutton97, iUserbutton98, iUserbutton99, iUserbutton100, iUserbutton101, iUserbutton102, iUserbutton103, iUserbutton104, iUserbutton105, iUserbutton106, iUserbutton107, iUserbutton108, iUserbutton109, iUserbutton110, iUserbutton111, iUserbutton112, iUserbutton113, iUserbutton114, iUserbutton115, iUserbutton116, iUserbutton117, iUserbutton118, iUserbutton119, iUserbutton120, iUserbutton121, iUserbutton122, iUserbutton123, iUserbutton124, iUserbutton125, iUserbutton126, iUserbutton127, iUserbutton128, iUserbutton129, iUserbutton130, iUserbutton131, iUserbutton132, iUserbutton133, iUserbutton134, iUserbutton135, iUserbutton136, iUserbutton137, iUserbutton138, -1, iUserbutton140, iUserbutton141, -1, -1, iUserbutton144, -1, -1, -1, iUserbutton148, iUserbutton149, iUserbutton150, iUserbutton151, iUserbutton152, iUserbutton153, iUserbutton154, iUserbutton155, iUserbutton156, iUserbutton157, iUserbutton158, iUserbutton159, iUserbutton160, iUserbutton161, iUserbutton162, iUserbutton163, iUserbutton164, iUserbutton165, iUserbutton166, iUserbutton167, iUserbutton168, iUserbutton169, iUserbutton170, -1, iUserbutton172, iUserbutton173, iUserbutton174, -1, -1, iUserbutton177, iUserbutton178, iUserbutton179, iUserbutton180, iUserbutton181, iUserbutton182, iUserbutton183, iUserbutton184, iUserbutton185, iUserbutton186, iUserbutton187, iUserbutton188, -1, iUserbutton190, iUserbutton191, -1, iUserbutton193, iUserbutton194, iUserbutton195, iUserbutton196, iUserbutton197, iUserbutton198, iUserbutton199, iUserbutton200, iUserbutton201, iUserbutton202, iUserbutton203, iUserbutton204, iUserbutton205, iUserbutton206, iUserbutton207, iUserbutton208, iUserbutton209, iUserbutton210, iUserbutton211, iUserbutton212, iUserbutton213, iUserbutton214, iUserbutton215, iUserbutton216, iUserbutton217, iUserbutton218, iUserbutton219, iUserbutton220, iUserbutton221, iUserbutton222, iUserbutton223, iUserbutton224, -1, iUserbutton226, iUserbutton227, iUserbutton228, iUserbutton229, iUserbutton230, iUserbutton231, -1, iUserbutton233, iUserbutton234, iUserbutton235, -1, iUserbutton237, iUserbutton238, iUserbutton239, -1, iUserbutton241, iUserbutton242, iUserbutton243, -1, -1, iUserbutton246, iUserbutton247, iUserbutton248, iUserbutton249, iUserbutton250, iUserbutton251, iUserbutton252, iUserbutton253, iUserbutton254
    word oMagicObjects 0
    word oSmartGauges 0
    word oSmartSliders 1, iSmartSlider0
    word oSmartKnobs 0
    word oTimers 0
    word oSoundss 0
    word oPinOutputs 0
    word FormBGcolors 0xFFFF, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage, ColorBGimage
    word kKeyboardKeystrokes -1
    word rKeyboardRoutines -1
    word oCustomDigitsn 6, 3, 1, 13, 1,
                165, 3, 1, 13, 1,
                326, 3, 1, 13, 1,
                45, 3, 1, 13, 1,
                205, 3, 1, 13, 1,
                365, 3, 1, 13, 1,
                392, 3, 1, 13, 1,
                392, 3, 1, 13, 1,
                392, 3, 1, 13, 1,
                267, 1, 1, 13, 0,
                285, 1, 1, 13, 0,
                392, 3, 1, 13, 1,
                204, 3, 1, 13, 1,
                72, 2, 1, 13, 1,
                0, 4, 1, 13, 1,
                0, 4, 1, 13, 1,
                72, 2, 1, 13, 1,
                200, 3, 1, 13, 1,
                388, 3, 1, 13, 1,
                416, 1, 1, 13, 0,
                392, 3, 1, 13, 1,
                392, 3, 1, 13, 1,
                434, 1, 1, 13, 0,
                392, 3, 1, 13, 1,
                332, 3, 1, 13, 1,
                384, 3, 1, 13, 1,
                332, 3, 1, 13, 1,
                384, 3, 1, 13, 1,
                332, 3, 1, 13, 1,
                384, 3, 1, 13, 1,
                212, 3, 1, 13, 1,
                192, 1, 1, 13, 0,
                208, 3, 1, 13, 1,
                210, 1, 1, 13, 0,
                192, 1, 1, 13, 0,
                210, 1, 1, 13, 0,
                92, 3, 1, 13, 1,
                333, 3, 1, 13, 1,
                28, 3, 1, 13, 1,
                149, 3, 1, 13, 1,
                269, 3, 1, 13, 1,
                337, 1, 1, 13, 0,
                355, 1, 1, 13, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                396, 4, 1, 12, 1,
                327, 2, 1, 12, 0,
                284, 3, 1, 12, 1,
                328, 2, 1, 12, 0,
                284, 3, 1, 12, 1,
                396, 4, 1, 12, 1,
                104, 1, 1, 13, 0,
                122, 1, 1, 13, 0,
                244, 1, 1, 13, 0,
                262, 1, 1, 13, 0,
                348, 4, 1, 13, 1,
                348, 4, 1, 13, 1,
                348, 4, 1, 13, 1,
                348, 4, 1, 13, 1,
                251, 3, 1, 13, 1,
                413, 3, 1, 13, 1,
                92, 3, 1, 13, 1,
                95, 1, 1, 13, 0,
                114, 1, 1, 13, 0,
                237, 1, 1, 13, 0,
                255, 1, 1, 13, 0,
                264, 1, 1, 13, 0,
                282, 1, 1, 13, 0,
                362, 1, 1, 13, 1,
                380, 1, 1, 13, 0,
                264, 1, 1, 13, 0,
                282, 1, 1, 13, 0,
                362, 1, 1, 13, 0,
                380, 1, 1, 13, 0,
                337, 1, 1, 13, 0,
                355, 1, 1, 13, 0
#END

var hFonts[56] ;
var stringsCV[56] := [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], hstrings ;
// Start P2.inc
var oObjects[MaxTotObjects+1] ;                 // address of objects
var CurrentForm, oldn, ImageTouched ;
var TouchXpos, TouchYpos ;
var InputType, TouchState, CurInputData, pInputIndex ;
var comRX[40], cmd[CMDLenMAX] ;

var InputCS, OutputCS ;



func seroutCS(var op)
    serout(op) ;
    OutputCS ^= op ;
endfunc

func nak0()
    serout(NAK) ;
    InputCS := 0 ;
endfunc

func seroutOcs()
    serout(OutputCS) ;
    OutputCS := 0 ;
endfunc

func SendReport(var id, var objt, var objn, var val)
    seroutCS(id) ;
    seroutCS(objt) ;
    seroutCS(objn) ;
    seroutCS(val >> 8) ; // first 8 bits
    seroutCS(val) ;
    seroutOcs() ;
endfunc

func TMul(var p1, var p2, var p3)
    var var32[2], var322[2] ;
    umul_1616(var32, p1, *(CurInputData+p2)) ;
    umul_1616(var322, var32[1], *(CurInputData+p3)) ;
    umul_1616(var32, var32[0], *(CurInputData+p3)) ;
    return(var32[1] + var322[0]) ;
endfunc

func ReadObject(var ObjectType, var ObjectIdx)
    var j, k, Objects ;
    Objects := *(oObjects+ObjectType) ;

    j := 2 + ObjectIdx * 2 + Objects ;
     if (ObjectType == tForm)
        k := CurrentForm ;
    else if ((ObjectType == tCustomdigits) || (ObjectType == tLeddigits))
        k := img_GetWord(hndl, *j, IMAGE_TAG2);
    else if (ObjectType == tStrings)
        k := stringsCV[ObjectIdx];
        else
        k := img_GetWord(hndl, *j, IMAGE_INDEX);
        if (((ObjectType == tWinButton) || (ObjectType == tAniButton) || (ObjectType == tUserButton) || (ObjectType == t4Dbutton)) && (k)) k := 1 ; // this is not correct for blocked buttons and cannot be fixed as we cannot
                                                                                                                                                    // determine if button is momentary or not which is needed for correct answer.
    endif
    SendReport(REPORT_OBJ, ObjectType, ObjectIdx, k) ;
endfunc


func WriteObject(var ObjectType, var ObjectIdx, var NewVal)
    var i, j, k, Objects ;
    ObjectType &= 0x3f ;
    if (ObjectType == tForm)
        ActivateForm(ObjectIdx) ;
    else
        Objects := *(oObjects+ObjectType)+ObjectIdx*2+2 ;
        i := *(Objects) ;
        switch (ObjectType)
            case tUserButton :
                j := InputControls[oUserButtons[ObjectIdx+1]] ;
                break ;
            case t4Dbutton :
                j := InputControls[o4Dbuttons[ObjectIdx+1]] ;
                break ;
            default : j := -1 ;
        endswitch
        if (j != -1)
            k := img_GetWord(hndl, i , IMAGE_INDEX) ;
            if (   (k == -1)                    // currently disabled
                && (NewVal != -1) )             // and don't want it disabled
                img_ClearAttributes(hndl, i, I_TOUCH_DISABLE);    // enable touch
            else if (   (k != -1)               // currently enabled
                     && (NewVal == -1) )        // and want it disabled
                img_SetWord(hndl, i, IMAGE_INDEX, 0xffff) ;       // make invisible
                img_SetAttributes(hndl, i, I_TOUCH_DISABLE);      // and disable touch
                if (FormBGcolors[CurrentForm] != ColorBGimage)
                    gfx_RectangleFilled(img_GetWord(hndl, i, IMAGE_XPOS), img_GetWord(hndl, i, IMAGE_YPOS),
                                        img_GetWord(hndl, i, IMAGE_XPOS) + img_GetWord(hndl, i, IMAGE_WIDTH),
                                        img_GetWord(hndl, i, IMAGE_YPOS) + img_GetWord(hndl, i, IMAGE_HEIGHT), FormBGcolors[CurrentForm]);
                else
                    gfx_ClipWindow(img_GetWord(hndl, i, IMAGE_XPOS), img_GetWord(hndl, i, IMAGE_YPOS),
                                   img_GetWord(hndl, i, IMAGE_XPOS) + img_GetWord(hndl, i, IMAGE_WIDTH),
                                   img_GetWord(hndl, i, IMAGE_YPOS) + img_GetWord(hndl, i, IMAGE_HEIGHT)) ;
                    gfx_Clipping(ON) ;
                    img_Show(hndl,FormStartIndex[CurrentForm]) ;
                    gfx_Clipping(OFF) ;
                endif
                return ;
            else
            NewVal := NewVal << 1 ;
            if (OVF())      // button group index change
                if (*(j+InputData+Ofs_IPD_P1))
                    k &= 1 ;    // mask off old group index for momentary
                else
                    k &= 3 ;    // mask off old group index for toggle
                endif
            else            // normal set
                if (*(j+InputData+Ofs_IPD_P2) != -1) TurnOffButtons(*(j+InputData+Ofs_IPD_P2)) ;
                k &= 0xfffc ;    // retain only group index for state set
            endif
            NewVal |= k ;
            endif
        endif
         if (ObjectType == tCustomdigits)
            img_SetWord(hndl, i , IMAGE_TAG2, NewVal); // where state is 0 to 2
            ledDigitsDisplay(i, oCustomdigitss, oCustomDigitsn) ;
        else if (ObjectType == tStrings)
            PrintStrings(ObjectIdx, NewVal, 0);
        else
            img_SetWord(hndl, i , IMAGE_INDEX, NewVal); // where state is 0 to 2
            img_Show(hndl, i) ; // will only display if form is current
        endif
    endif
endfunc

func TurnOffButtons(var group)
    var j, k, l;
    for (j := 0; j < nInputs; j++)
        k := j*IPDatasize ;
        if (*(InputData+k+Ofs_IPD_P2) == group)
            l := -1 ;
             if (*(InputData+k) == t4Dbutton)
                l := o4Dbuttons[*(InputData+k+Ofs_IPD_OBJVIDX)/2] ;
                if (img_GetWord(hndl, l, IMAGE_INDEX) != 0xffff)
                img_SetWord(hndl, l, IMAGE_INDEX, 0);
                img_Show(hndl, l);      // only shows on current form
                endif
            else if (*(InputData+k) == tUserButton)
                l := oUserButtons[*(InputData+k+Ofs_IPD_OBJVIDX)/2] ;
                img_SetWord(hndl, l, IMAGE_INDEX, img_GetWord(hndl, l, IMAGE_INDEX) & 0xfffc );
                img_Show(hndl, l);      // only shows on current form
            endif
        endif
    next
endfunc


// WARNING, this code will crash if newval exceeds maximum displayable number
func ledDigitsDisplay(var imgidx, var typeptr, var setptr)
    var i, j, m, left, lstb, nv, newval, digita[7] ; // 7 is enough for -32768, the 0th digit is not used
    if (!((img_GetWord(hndl, imgidx, IMAGE_FLAGS) & I_ENABLED))) return ;  // ;img_GetWord(hndl, imgidx, IMAGE_TAG2) ;if diabled then exit
    newval := img_GetWord(hndl, imgidx, IMAGE_TAG2) ;
    i := -1 ;
    j := *(typeptr) ;
    repeat
        typeptr += 2 ;
        i++ ;
        until (*(typeptr) == imgidx);
    j := setptr + i*10 ;
    left := *(j+Ofs_Digits_Left) ;
    imgidx++ ;

    nv := newval ;
    lstb := 1 ;
    for (i := *(j+Ofs_Digits_Digits); i > 0; i--)
        m := nv % 10 ;
        if ( *(j+Ofs_Digits_LeadingBlanks) && (i <= *(j+Ofs_Digits_Digits) - *(j+Ofs_Digits_MinDigits)) )
            if (nv == 0)
                m := 10 ;
                if (lstb == 1) lstb := i ;
            endif
        endif

        digita[i] := ABS(m) ;
        nv /= 10 ;
    next
    if (newval < 0)
        digita[lstb] := 11 ;
    endif
    for (i := 1; i <= *(j+Ofs_Digits_Digits); i++)
        img_SetWord(hndl, imgidx, IMAGE_INDEX, digita[i]);
        img_SetWord(hndl, imgidx, IMAGE_XPOS, left) ;
        img_Show(hndl, imgidx);
        left += *(j+Ofs_Digits_Widthdigit) ;
    next
endfunc


func ActivateForm(var newform)
    var i, j, *p ;

    if (CurrentForm != -1) // deactivate old form, by disabling all inputs
        for (i := FormStartIndex[CurrentForm]; i <= FormEndIndex[CurrentForm]; i++)
            if (img_GetWord(hndl, i, IMAGE_TAG))
                img_Disable(hndl,i) ;
            endif
        next
    endif
    CurrentForm := newform ;
    // display newform image or clear to image color
    if (FormBGcolors[CurrentForm] != ColorBGimage)
        gfx_Set(BACKGROUND_COLOUR,FormBGcolors[CurrentForm]);
        gfx_Cls() ;
        DoGFXObjects() ;                                    // display GFX 'widgets'
    endif

    // enable inputs
    for (i := FormStartIndex[CurrentForm]; i < FormEndIndex[CurrentForm]; i++)
        j := img_GetWord(hndl, i, IMAGE_TAG) ;
        if (j)
            j-- ;
            img_SetAttributes(hndl, i, I_STAYONTOP+I_ENABLED);        // make sure this is on top of form, if applicable
            //if (j != tKeyboard)
            if (img_GetWord(hndl, i, IMAGE_INDEX) != 0xffff)
            if (((j <= tWinButton) || (j >= t4Dbutton)) && (j != tSmartGauge) )               // enable inputs
                img_ClearAttributes(hndl, i, I_TOUCH_DISABLE);        // ensure touch is enabled
            endif
            img_Show(hndl,i) ; // show initialy, if required
            endif
            if (j == tForm)
                DoGFXObjects() ;                                    // display GFX 'widgets' for image backgruobds
            else if (j == tCustomdigits)
                ledDigitsDisplay(i, oCustomdigitss, oCustomDigitsn) ;
            endif
        endif
    next
    for (i := 0; i < nStrings; i++)
        if (stringsCV[i] != -1)
            WriteObject(tStrings, i, stringsCV[i]) ;
        endif
    next

endfunc

func UpdateObjects(var newval)
    var IPidx, otherOBJ ;
    if ( ( img_GetWord(hndl, *(pInputIndex), IMAGE_INDEX) != newval) || (TouchState == Ofs_IPD_RELEASE) ) // only bother if values changed, or release

        img_SetWord(hndl, *(pInputIndex), IMAGE_INDEX, newval);
            img_Show(hndl, *(pInputIndex));      // only shows on current form
        if ((InputType == t4Dbutton) || (InputType == tUserButton) || (InputType == tWinButton))
            if (*(CurInputData+Ofs_IPD_P1))
                newval &= 1;
            else
                newval &= 3;
            endif
            if (newval > 1) newval := 1;
        endif
        IPidx := *(CurInputData+TouchState) ;
        while(IPidx != 0)
            otherOBJ := IPidx + InputData;
            if (*(otherOBJ) == OT_REPORT)
        SendReport(REPORT_EVENT, InputType, *(otherOBJ+Ofs_IPD_OBJVIDX), newval) ;
            else if (*(otherOBJ) == OT_MAGIC)
                IPidx := *(otherOBJ+Ofs_IPD_P5) ;
                IPidx(newval) ;
            else if (TouchState == *(otherOBJ+Ofs_IPD_P4))
                if (*(otherOBJ) == OT_ACTIVATE)
                    ActivateForm(*(otherOBJ+Ofs_IPD_P2) ) ;
                    InputType := tForm ;
                else if (*(otherOBJ) == OT_SETCONST)
                    newval := *(otherOBJ+Ofs_IPD_P3) ;
                    WriteObject(*(otherOBJ+Ofs_IPD_P1), *(otherOBJ+Ofs_IPD_P2), newval) ;
                else if (*(otherOBJ) == OT_SETANOTHER)
                    WriteObject(*(otherOBJ+Ofs_IPD_P1), *(otherOBJ+Ofs_IPD_P2), newval) ;
                else if (*(otherOBJ) == OT_PREVFRAME)
                    if (img_GetWord(hndl, *(otherOBJ+Ofs_IPD_P6), IMAGE_INDEX))
                        WriteObject(*(otherOBJ+Ofs_IPD_P5),*(otherOBJ+Ofs_IPD_P2),img_GetWord(hndl, *(otherOBJ+Ofs_IPD_P6), IMAGE_INDEX)-1) ;
                    endif
                    newval := img_GetWord(hndl, *(otherOBJ+Ofs_IPD_P6), IMAGE_INDEX) ;
                else if (*(otherOBJ) == OT_NEXTFRAME)
                    if (img_GetWord(hndl, *(otherOBJ+Ofs_IPD_P6), IMAGE_INDEX) < *(otherOBJ+Ofs_IPD_P3))
                        WriteObject(*(otherOBJ+Ofs_IPD_P5),*(otherOBJ+Ofs_IPD_P2),img_GetWord(hndl, *(otherOBJ+Ofs_IPD_P6), IMAGE_INDEX)+1) ;
                    endif
                    newval := img_GetWord(hndl, *(otherOBJ+Ofs_IPD_P6), IMAGE_INDEX) ;
                else if (*(otherOBJ) == OT_PREVSTRING)
                    if (stringsCV[*(otherOBJ+Ofs_IPD_P2)])
                        WriteObject(tStrings,*(otherOBJ+Ofs_IPD_P2),stringsCV[*(otherOBJ+Ofs_IPD_P2)]-1) ;
                    endif
                else if (*(otherOBJ) == OT_NEXTSTRING)
                    if (stringsCV[*(otherOBJ+Ofs_IPD_P2)] < *(otherOBJ+Ofs_IPD_P3)) // fix IPD_P2 not filled in yet
                        WriteObject(tStrings,*(otherOBJ+Ofs_IPD_P2),stringsCV[*(otherOBJ+Ofs_IPD_P2)]+1) ;
                    endif
                endif
            endif
            IPidx := *(otherOBJ+TouchState) ;
        wend
    endif
endfunc

// End P2.inc
func DoGFXObjects()
endfunc

// Start P3.inc
func main()
    var comTX[50], cmdi, i, j, TouchStatus ;


    gfx_ScreenMode(LANDSCAPE) ;

    putstr("Mounting...\n");
    if (!(file_Mount()))
        while(!(file_Mount()))
            putstr("Drive not mounted...");
            pause(200);
            gfx_Cls();
            pause(200);
        wend
    endif
//    gfx_MoveTo(0, 0);
//    print(mem_Heap()," ") ;
//    gfx_TransparentColour(0x0020);
//    gfx_Transparency(ON);

    // open image control
    hndl := file_LoadImageControl("BCN3D_~1.dat", "BCN3D_~1.gci", 1);

    // init 'constants'
// End P3.inc

    oObjects[tDipSwitch] := oDipSwitchs ;
    oObjects[tKnob] := oKnobs ;
    oObjects[tRockerSwitch] := oRockerSwitchs ;
    oObjects[tRotarySwitch] := oRotarySwitchs ;
    oObjects[tGSlider] := oGSliders ;
    oObjects[tTrackbar] := oTrackbars ;
    oObjects[tWinButton] := oWinButtons ;
    oObjects[tAngularmeter] := oAngularmeters ;
    oObjects[tCoolgauge] := oCoolgauges ;
    oObjects[tCustomdigits] := oCustomdigitss ;
    oObjects[tForm] := oForms ;
    oObjects[tGauge] := oGauges ;
    oObjects[tImage] := oImages ;
    oObjects[tKeyboard] := oKeyboards ;
    oObjects[tLed] := oLeds ;
    oObjects[tLeddigits] := oLeddigitss ;
    oObjects[tMeter] := oMeters ;
    oObjects[tStrings] := oStringss ;
    oObjects[tThermometer] := oThermometers ;
    oObjects[tUserled] := oUserleds ;
    oObjects[tVideo] := oVideos ;
    oObjects[tStaticText] := oStaticTexts ;
    oObjects[tSounds] := oSoundss ;
    oObjects[tTimer] := oTimers ;
    oObjects[tSpectrum] := oSpectrums ;
    oObjects[tTank] := oTanks ;
    oObjects[tUserImages] := oUserImagess ;
    oObjects[tPinOutput] := oPinOutputs ;
    oObjects[tPinInput] := oPinInputs ;
    oObjects[t4Dbutton] := o4Dbuttons ;
    oObjects[tAniButton] := oAniButtons ;
    oObjects[tColorPicker] := oColorPickers ;
    oObjects[tUserButton] := oUserButtons ;
    oObjects[tMagicObject] := oMagicObjects ;
    oObjects[tSmartGauge] := oSmartGauges ;
    oObjects[tSmartSlider] := oSmartSliders ;
    oObjects[tSmartKnob] := oSmartKnobs ;
    hFonts[1] := file_LoadImageControl("BCN3D_~1.d02", "BCN3D_~1.g02", 1)  ;
    hFonts[2] := file_LoadImageControl("BCN3D_~1.d07", "BCN3D_~1.g07", 1)  ;
    hFonts[3] := file_LoadImageControl("BCN3D_~1.d01", "BCN3D_~1.g01", 1)  ;
    hFonts[48] := file_LoadImageControl("BCN3D_~1.d0C", "BCN3D_~1.g0C", 1)  ;
    hFonts[0] := hFonts[2] ;
    hFonts[4] := hFonts[2] ;
    hFonts[5] := hFonts[2] ;
    hFonts[6] := hFonts[2] ;
    hFonts[7] := hFonts[2] ;
    hFonts[8] := hFonts[1] ;
    hFonts[9] := hFonts[2] ;
    hFonts[10] := hFonts[2] ;
    hFonts[11] := hFonts[2] ;
    hFonts[12] := hFonts[1] ;
    hFonts[13] := hFonts[48] ;
    hFonts[14] := hFonts[2] ;
    hFonts[16] := hFonts[1] ;
    hFonts[23] := hFonts[1] ;
    hFonts[27] := hFonts[2] ;
    hFonts[38] := hFonts[2] ;
    hFonts[39] := hFonts[2] ;
    hFonts[44] := hFonts[2] ;
    hFonts[49] := hFonts[2] ;
    hFonts[50] := hFonts[1] ;
    hFonts[52] := hFonts[2] ;
    hFonts[53] := hFonts[48] ;
    hFonts[55] := hFonts[48] ;
// Start P4.inc
    hstrings := file_Open("BCN3D_~1.txf", 'r') ; // Open handle to access uSD strings, uncomment if required
    // init comms
    com_Init(comRX,CMDLenMAX,0);
    com_SetBaud(COM0,19886);
    com_TXbuffer(comTX, 100, 0);
    snd_BufSize(2) ;
    // tag 'real' objects
    for (i := 0; i <= MaxTotObjects; i++)
        if (   (i != tSounds)
            && (i != tTimer)
            && (i != tPinOutput)
            && (i != tMagicObject)
            && (i != tPinInput) )
            TouchXpos := oObjects[i] ;
            TouchYpos := *(TouchXpos) ;
            for (ImageTouched := 1; ImageTouched <= TouchYpos; ImageTouched++)
                oldn := *(TouchXpos+ImageTouched*2) ;
                img_SetAttributes(hndl, oldn, I_TOUCH_DISABLE);  // ensure touch is enabled
                if (oldn != -1)
                    img_SetWord(hndl, oldn, IMAGE_TAG, i+1);
                    img_Disable(hndl, oldn) ;
                endif
            next
        endif
    next

    // display initial form
    CurrentForm := -1 ;
// End P4.inc
// Start P5.inc
    ActivateForm(0) ; // need to change this according to first actual form

// End P5.inc
// Start P6.inc
    touch_Set(TOUCH_ENABLE);                            // enable the touch screen
    oldn := -1 ;
    repeat

        // check comms for command, how to NAK invalid command
        if (com_Count() != 0)
            i := serin() ;
            InputCS ^= i ;               // update checksum
            if (   (cmdi > 2)
                && (cmd[0] == WRITE_STRU) )
                j := (cmdi-1) >> 1 + 2 ;
                if (j == CMDLenMAX)    // max length exceeded
                    nak0() ;
                    cmdi := -1 ;
                else if (cmdi & 1)
                    cmd[j] := i ;
                    if (cmd[2] == 0)    // if string complete
                        if (InputCS)
                            nak0() ;
                        else
                            if (cmd[0] == WRITE_STRU)
                            cmd[j] := 0 ;                     // terminate it
                            PrintStrings(cmd[1], &cmd[3], 1) ;
                            serout(ACK) ;
                            else
                            endif
                        endif
                        cmdi := -1 ;
                    endif
                else
                    cmd[j] := cmd[j] << 8 + i ;
                    cmd[2]-- ;          // dec length
                endif
                cmdi++ ;
            else // not unicode string
                cmd[cmdi++] := i ;
                 if (cmd[0] == WRITE_STR)                  // Ansi String
                    if (cmdi == CMDLenMAX)      // max length exceeded
                        nak0() ;
                        cmdi := 0 ;
                    else if (cmdi > 2)
                        if (cmd[2] == -1)
                            if (InputCS)
                                nak0() ;
                            else
                                if (cmd[0] == WRITE_STR)
                                cmd[cmdi-1] := 0 ;                     // terminate it
                                PrintStrings(cmd[1], &cmd[3], 1) ;
                                serout(ACK) ;
                                else
                                endif
                            endif
                            cmdi := 0 ;
                        else
                            cmd[2]-- ;          // dec length
                        endif
                    endif
                else if (   (cmd[0] == READ_OBJ)
                         && (cmdi == 4)         )
                    if (InputCS)
                        nak0() ;
                    else
                        ReadObject(cmd[1], cmd[2]) ;
                    endif
                    cmdi := 0 ;
                else if (   (cmd[0] == WRITE_OBJ)    // 6 byte write command (gen option)
                         && (cmdi == 6)          )
                    if (InputCS)
                        nak0() ;
                    else
                        WriteObject(cmd[1], cmd[2], cmd[3] << 8 + cmd[4]) ;
                        serout(ACK) ;
                    endif
                    cmdi := 0 ;
                else if (   (cmd[0] == WRITE_CONTRAST)
                         && (cmdi == 3)         )
                    if (InputCS)
                        nak0() ;
                    else
                        gfx_Contrast(cmd[1]) ;
                        serout(ACK) ;
                    endif
                    cmdi := 0 ;
                else if (cmdi == 6)    // we have 6 bytes and we've gotten here -> something wrong
                    nak0() ;
                    cmdi := 0 ;
                endif
            endif   // not unicode string
        endif   // a character is available


    // touch code processing

        TouchStatus := touch_Get(TOUCH_STATUS);               // get touchscreen status
        ImageTouched := img_Touched(hndl,-1) ;
        if ((TouchStatus == TOUCH_PRESSED) || (TouchStatus == TOUCH_RELEASED) || (TouchStatus == TOUCH_MOVING))
            if ((TouchStatus != TOUCH_RELEASED) && (ImageTouched != oldn) && (oldn != -1))
                TouchStatus := TOUCH_RELEASED ;       // simulate release if we move off object
            endif
            if (TouchStatus != TOUCH_RELEASED)        // if not released
                if (oldn != -1)
                    ImageTouched := oldn ;
                else
                    if (oldn != ImageTouched)
                oldn := ImageTouched ;
                        TouchStatus := TOUCH_PRESSED ;
                    endif
                endif
                TouchXpos  := touch_Get(TOUCH_GETX);
                TouchYpos  := touch_Get(TOUCH_GETY);
                TouchState := Ofs_IPD_DOWN ;
            else
                ImageTouched := oldn ;                     // simulate release of what we touched
                oldn := -1 ;                    // prevent double release
                TouchState := Ofs_IPD_RELEASE ;
            endif
            if (ImageTouched != -1)
                        CurInputData := InputControls[ImageTouched] + InputData;
                        InputType := *(CurInputData) ;
                        if (InputType == tSmartSlider)
                            i := tTrackbar ; // GSlider ;
                        else if (InputType == tSmartKnob)
                            i := tKnob ;
                        else if (InputType >= t4Dbutton) 
                            i := InputType - 23 ; // adjust to ensure next in gosub
                        else 
                            i := InputType ;
                        endif
                        gosub (i), (cDipswitch, cKnob, cRockerswitch, cRotaryswitch, cSlider, cTrackbar, cWinbutton, c4DButton, cAniButton, cColorPicker, cUserButton) ;
            endif
        endif
 //       if ((n != -1) && (oldn == -1)) oldn := n ;    // save what we touched in case we move off it

        sys_EventsResume() ;
    forever

cDipswitch:

cKnob:

cRockerswitch:

cRotaryswitch:

cSlider:
cTrackbar:
    if (*(CurInputData+Ofs_IPD_P1))
        i := TouchXpos - *(CurInputData+Ofs_IPD_P2) ;
        if (i < 0)
            i := 0 ;
        else if (i > *(CurInputData+Ofs_IPD_P3))        // height/width - 17)
            i := *(CurInputData+Ofs_IPD_P4) ;           // maxvalue-minvalue
        else
//            i := *(input+IPD_P4) * i / *(input+IPD_P3) ;    // max-min - (max-min) * posn / (height-17)
            i := TMul(i, Ofs_IPD_P4, Ofs_IPD_P5) ;    // max-min - (max-min) * posn / (height-17)
        endif
    else
        i := TouchYpos - *(CurInputData+Ofs_IPD_P2) ;
        if (i < 0)
            i := *(CurInputData+Ofs_IPD_P4) ;           // maxvalue-minvalue
        else if (i > *(CurInputData+Ofs_IPD_P3))        // height/width - 17)
            i := 0 ;
        else
//            i := *(input+IPD_P4) - *(input+IPD_P4) * i / *(input+IPD_P3) ;    // max-min - (max-min) * posn / (height-17)
            i := *(CurInputData+Ofs_IPD_P4) - TMul(i, Ofs_IPD_P4, Ofs_IPD_P5) ;    // max-min - (max-min) * posn / (height-17)
        endif
    endif
    if (InputType == tGSlider)
        pInputIndex := oGSliders ;
    else if (InputType == tSmartSlider)
        pInputIndex := oSmartSliders ;
    else
        pInputIndex := oTrackbars ;
    endif
    pInputIndex += *(CurInputData+Ofs_IPD_OBJVIDX) ;
    UpdateObjects(i) ;
endsub ;

c4DButton:
    pInputIndex := o4Dbuttons + *(CurInputData+Ofs_IPD_OBJVIDX) ;
    goto gbutton ;
cUserButton:
    pInputIndex := oUserButtons + *(CurInputData+Ofs_IPD_OBJVIDX) ;
    goto gbutton ;
cWinbutton:
gbutton:
    i := img_GetWord(hndl, *(pInputIndex), IMAGE_INDEX) ; // current state
    if (*(CurInputData+Ofs_IPD_P1))                                 // momentary, reports 0, but should report 1
        if (TouchStatus == TOUCH_RELEASED)
            i &= 0xfffe ;
            TouchState == Ofs_IPD_DOWN ;
        else
            i |= 1 ;
            TouchState == Ofs_IPD_RELEASE ;
        endif
    else if (*(CurInputData+Ofs_IPD_P2) == -1)                      // Toggle, reports 0+2, but should report 0+1
        if (TouchStatus == TOUCH_RELEASED)                     // only truly change on release
            if ((i & 3) == 3)
                i &= 0xfffc ;
            else
                i++ ;
            endif
        else
            i |= 1 ;                                      // make down regardless of current state
        endif
    else                        // group action, up all other buttons on touch press, reports 0 for button down
        if (TouchStatus == TOUCH_PRESSED)                     // only truly change on release
            TurnOffButtons(*(CurInputData+Ofs_IPD_P2)) ;
        endif
        i := (i & 0xfffc) | 2 ;
    endif

    UpdateObjects(i) ;
endsub ;

cAniButton:

cColorPicker:

endfunc
// End P6.inc
